<!DOCTYPE html>
<html lang="en">
<head>
    <title>司法所首页-要点击跳转</title>
    <link rel="stylesheet" href="/static/css/main-page/g-reset.css" />
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/main-page/home-public.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/main-page/home2.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/main-page/messageDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/static/js/main-page/echarts.min.js"></script>
    <style>
        body {
            height:100%;
            background:transparent;
        }
        .home-page {
            width:100%;
            height:100%;
        }
    </style>

</head>
<body>
<div class="home-page">
    <div class="home-top clearfix">
        <div class="home-top-left">
            <ul class="region-title clearfix">
                <li class="tab-item tab-active" style="cursor:default;"><i class="iconfont icon-jigouxinxi"></i> 机构人员信息</li>
            </ul>
            <div class="clearfix" style="padding: 20px 25px;position: relative;">
                <div class="org-info">
                    <i class="fa fa-sitemap fl" aria-hidden="true"></i>
                    <div class="org-info-title">
                        <div class="org-info-lable">机构名称:</div>
                        <p id="department">———</p>
                    </div>
                </div>
                <div class="info-box-padding">
                    <div>通讯录</div>
                    <ul class="info-box custom-scrollbar">
                    </ul>
                </div>
            </div>
        </div>
        <div class="home-top-center">
            <ul class="region-title clearfix">
                <li class="tab-item tab-active" style="cursor:default;"><i class="iconfont icon-anbangxinxitongji" aria-hidden="true"></i>&nbsp;安帮信息统计
                </li>
            </ul>
            <div class="org-statistics">
                <div class="org-statistics-title">
                    <i class="iconfont icon-anzhibangjiaoduixiang"></i> 安置帮教对象
                </div>
                <div class="tab-wrapper" style="display:none">
                    <div id="mainTabs" class="mini-tabs main-tabs" activeIndex="0" plain="false">
                    </div>
                </div>
                <ul class="azbjdx-box clearfix">
                    <li style="cursor:pointer;" onclick="toPage(1)">
                        <span>${sfsjMap.bjdxrs!0}</span>
                        <div>帮教对象人数</div>
                    </li>
                    <li style="cursor:pointer;" onclick="toPage(2)">
                        <span>${sfsjMap.zdbjdxrs!0}</span>
                        <div>重点帮教对象人数</div>
                    </li>
                    <li style="cursor:pointer;" onclick="toPage(3)">
                        <span>${sfsjMap.wxjrs!0}</span>
                        <div>未衔接人数</div>
                    </li>
                    <li style="cursor:pointer;" onclick="toPage(4)">
                        <span>${sfsjMap.slrs!0}</span>
                        <#if "${localCode!''}" == "140000">
                            <div>人户分离人数</div>
                        <#else>
                            <div>失联人数</div>
                        </#if>
                    </li>
                </ul>
                <div class="org-statistics-title">
                    <i class="iconfont icon-anzhibangjiaozuzhi"></i> 安置帮教组织
                </div>
                <ul class="azbjzz-box clearfix">
                    <li style="cursor:pointer;" onclick="toPage(5)">
                        <span>${sfsjMap.azbjjd!0}</span>
                        <div>安置帮教基地数量</div>
                    </li>
                    <li style="cursor:pointer;" onclick="toPage(6)">
                        <span>${sfsjMap.shzz!0}</span>
                        <div>社会组织数量</div>
                    </li>
                    <li style="cursor:pointer;" onclick="toPage(7)">
                        <span>${sfsjMap.zyzrs!0}</span>
                        <div>志愿者人数</div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="home-top-right" id="a123">
            <ul class="tab-item-box region-title clearfix" id="aaaa">
                <li data-arg="getSyTzggList" class="tab-item tab-active" id="b1"><span style="font-size: 15px">通知公告</span></li>
                <li data-arg="getSySbxtList" class="tab-item" id="b2"><span style="font-size: 15px">上报协调</span></li>
                <li data-arg="getSyZcwjList" class="tab-item" id="b3"><span style="font-size: 15px">政策文件</span></li>
                <li data-arg="getSyJytjList" class="tab-item" id="b4"><span style="font-size: 15px">经验推介</span></li>
                <li data-arg="getXttzList" class="tab-item" id="b5"><span style="font-size: 15px">系统通知</span></li>
            </ul>
            <div>
                <div class="data-loading">
                    <i class="fa fa-spinner fa-pulse fa-3x "></i>
                </div>
                <ul class="message-content" id="content">
                </ul>
            </div>

        </div>
    </div>

    <#-- 统计图部分 -->
    <div class="home-bottom">
        <div class="region-title clearfix">
            <div class="tab-item tab-active" style="cursor:default;"><i class="iconfont icon-shujutongjifenxi"></i> 统计图表</div>
        </div>
        <ul class="clearfix">
            <li>
                <div>
                    <div id="div1" style="height: 100%;width: 100%;"></div>
                </div>
            </li>
            <li>
                <div>
                    <div id="div2" style="height: 100%;width: 100%;"></div>
                </div>
            </li>
            <li>
                <div>
                    <div id="div3" style="height: 100%;width: 100%;"></div>
                </div>
            </li>
            <li>
                <div>
                    <div id="div4" style="height: 100%;width: 100%;"></div>
                </div>
            </li>
            <li>
                <div>
                    <div id="div5" style="height: 100%;width: 100%;"></div>
                </div>
            </li>
            <li>
                <div>
                    <div id="div6" style="height: 100%;width: 100%;"></div>
                </div>
            </li>
        </ul>
    </div>

    <#-- 弹出框 -->
    <div class="tankuang">
        <div class="tankuang-content">
            <div class="tkTitle">详情</div>
            <div class="content">
                <!--案例内文开始-->
                <div class="wzinfo">
                    <h3 class="title"></h3>
                    <h5>详细内容 <span>发布时间:<i class="adddate"></i></span> <span>发布单位:<i class="fbdw"></i></span></h5>
                    <div id="content123">
                    </div>
                </div>
                <!--案例内文结束-->
            </div>
            <input name="id" id="id" hidden readonly />
            <!-- 通知类型 -->
            <input name="type" id="type" hidden readonly />
            <div class="closeTK1" id="fujian" onclick="downloadFile()">下载附件</div>
            <div class="closeTK">关闭</div>
        </div>
    </div>
</div>
<script src="/static/js/common/common.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/main-page/messageNotification.js"></script>
<script type="text/javascript" src="/static/js/main-page/main.js"></script>
<script type="text/javascript">
    $(function () {
        mini.parse();
        var div1 = echarts.init(document.getElementById('div1'));
        var div2 = echarts.init(document.getElementById('div2'));
        var div3 = echarts.init(document.getElementById('div3'));
        var div4 = echarts.init(document.getElementById('div4'));
        var div5 = echarts.init(document.getElementById('div5'));
        var div6 = echarts.init(document.getElementById('div6'));
        var month = [], yearCount = [], lastYearCount = [], ratioYear = [], ratioMonth = [], countSum = [];
        var maxPopulation = [], halve = []
        $.ajax({
            url: "/main/chart1",
            async: true,
            type: "GET",
            dataType: "json",
            success: function (data) {
                if (data) {
                    month = mini.decode(data.month);
                    yearCount = mini.decode(data.yearCount);
                    lastYearCount = mini.decode(data.lastYearCount);
                    ratioYear = mini.decode(data.ratioYear);
                    ratioMonth = mini.decode(data.ratioMonth);
                    countSum = mini.decode(data.countSum);
                    maxPopulation = mini.decode(data.maxPopulation)
                    halve = mini.decode(data.halve)
                    chart_load1();
                }
            }
        });

        $.ajax({
            url: "/main/chart2",
            async: true,
            type: "GET",
            dataType: "json",
            success: function (data) {
                if (data) {
                    month = mini.decode(data.month);
                    yearCount = mini.decode(data.yearCount);
                    lastYearCount = mini.decode(data.lastYearCount);
                    ratioYear = mini.decode(data.ratioYear);
                    ratioMonth = mini.decode(data.ratioMonth);
                    countSum = mini.decode(data.countSum);
                    maxPopulation = mini.decode(data.maxPopulation)
                    halve = mini.decode(data.halve)
                    chart_load2();
                }
            }
        });

        $.ajax({
            url: "/main/chart3",
            async: true,
            type: "GET",
            dataType: "json",
            success: function (data) {
                if (data) {
                    month = mini.decode(data.month);
                    yearCount = mini.decode(data.yearCount);
                    lastYearCount = mini.decode(data.lastYearCount);
                    ratioYear = mini.decode(data.ratioYear);
                    ratioMonth = mini.decode(data.ratioMonth);
                    countSum = mini.decode(data.countSum);
                    maxPopulation = mini.decode(data.maxPopulation)
                    halve = mini.decode(data.halve)
                    chart_load3();
                }
            }
        });

        $.ajax({
            url: "/main/chart4",
            async: true,
            type: "GET",
            dataType: "json",
            success: function (data) {
                if (data) {
                    month = mini.decode(data.month);
                    yearCount = mini.decode(data.yearCount);
                    lastYearCount = mini.decode(data.lastYearCount);
                    ratioYear = mini.decode(data.ratioYear);
                    ratioMonth = mini.decode(data.ratioMonth);
                    countSum = mini.decode(data.countSum);
                    maxPopulation = mini.decode(data.maxPopulation)
                    halve = mini.decode(data.halve)
                    chart_load4();
                }
            }
        });

        $.ajax({
            url: "/main/chart5",
            async: true,
            type: "GET",
            dataType: "json",
            success: function (data) {
                if (data) {
                    month = mini.decode(data.month);
                    yearCount = mini.decode(data.yearCount);
                    lastYearCount = mini.decode(data.lastYearCount);
                    ratioYear = mini.decode(data.ratioYear);
                    ratioMonth = mini.decode(data.ratioMonth);
                    countSum = mini.decode(data.countSum);
                    maxPopulation = mini.decode(data.maxPopulation)
                    halve = mini.decode(data.halve)
                    chart_load5();
                }
            }
        });

        $.ajax({
            url: "/main/chart6",
            async: true,
            type: "GET",
            dataType: "json",
            success: function (data) {
                if (data) {
                    month = mini.decode(data.month);
                    yearCount = mini.decode(data.yearCount);
                    lastYearCount = mini.decode(data.lastYearCount);
                    ratioYear = mini.decode(data.ratioYear);
                    ratioMonth = mini.decode(data.ratioMonth);
                    countSum = mini.decode(data.countSum);
                    maxPopulation = mini.decode(data.maxPopulation)
                    halve = mini.decode(data.halve)
                    chart_load6();
                }
            }
        });

        function chart_load1() {
            option1 = {
                title: {text: '安置帮教对象总数', left: "25%"},
                tooltip: {
                    trigger: 'axis'
                },
                color: ['#6BC9B6', '#5A88F6', '#ECA03B', '#7FC555'],
                toolbox: {},
                legend: {
                    data: ['月数量（本年）', '月数量（上年）', /*'同比比率', '环比比率'*/],
                    right: 0,
                    bottom: 50,
                    orient: 'vertical',
                    itemWidth: 18
                },
                grid: {
                    top: '25%',
                    right: "35%"
                },
                xAxis: [
                    {
                        type: 'category',
                        data: month,
                        axisPointer: {
                            type: 'shadow'
                        },
                        axisLabel: {
                            rotate: 50
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '人数',
                        min: 0,
                        max: maxPopulation,
                        interval: halve,
                        axisLabel: {
                            formatter: '{value} '
                        }
                    },
                ],
                series: [
                    {
                        name: '月数量（本年）',
                        type: 'bar',
                        data: yearCount
                    },
                    {
                        name: '月数量（上年）',
                        type: 'bar',
                        data: lastYearCount
                    },
                ]
            };
            div1.setOption(option1);
        }

        function chart_load2() {
            option2 = {
                title: {text: '已衔接重点帮教对象总数', left: '25%'},
                tooltip: {
                    trigger: 'axis'
                },
                color: ['#6BC9B6', '#5A88F6', '#ECA03B', '#7FC555'],
                toolbox: {},
                legend: {
                    data: ['月数量（本年）', '月数量（上年）',/* '同比比率', '环比比率'*/],
                    right: 0,
                    bottom: 50,
                    orient: 'vertical',
                    itemWidth: 18
                },
                grid: {
                    top: '25%',
                    right: "35%"
                },
                xAxis: [
                    {
                        type: 'category',
                        data: month,
                        axisPointer: {
                            type: 'shadow'
                        },
                        axisLabel: {
                            rotate: 50
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '人数',
                        min: 0,
                        max: maxPopulation,
                        interval: halve,
                        axisLabel: {
                            formatter: '{value} '
                        }
                    },
                ],
                series: [
                    {
                        name: '月数量（本年）',
                        type: 'bar',
                        data: yearCount
                    },
                    {
                        name: '月数量（上年）',
                        type: 'bar',
                        data: lastYearCount
                    },
                ]
            };
            div2.setOption(option2);
        }

        function chart_load3() {
            option3 = {
                title: {text: '核查总数', left: '28%'},
                tooltip: {
                    trigger: 'axis'
                },
                color: ['#6BC9B6', '#5A88F6', '#ECA03B', '#7FC555'],
                toolbox: {},
                legend: {
                    data: ['月数量（本年）', '月数量（上年）',/* '同比比率', '环比比率'*/],
                    right: 0,
                    bottom: 50,
                    orient: 'vertical',
                    itemWidth: 18
                },
                grid: {
                    top: '25%',
                    right: "35%"
                },
                xAxis: [
                    {
                        type: 'category',
                        data: month,
                        axisPointer: {
                            type: 'shadow'
                        },
                        axisLabel: {
                            rotate: 50
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '人数',
                        min: 0,
                        max: maxPopulation,
                        interval: halve,
                        axisLabel: {
                            formatter: '{value} '
                        }
                    },
                ],
                series: [
                    {
                        name: '月数量（本年）',
                        type: 'bar',
                        data: yearCount
                    },
                    {
                        name: '月数量（上年）',
                        type: 'bar',
                        data: lastYearCount
                    },
                ]
            };
            div3.setOption(option3);
        }

        function chart_load4() {
            option4 = {
                title: {text: '已衔接总数', left: '28%'},
                tooltip: {
                    trigger: 'axis'
                },
                color: ['#6BC9B6', '#5A88F6', '#ECA03B', '#7FC555'],
                toolbox: {},
                legend: {
                    data: ['月数量（本年）', '月数量（上年）', /*'同比比率', '环比比率'*/],
                    right: 0,
                    bottom: 50,
                    orient: 'vertical',
                    itemWidth: 18
                },
                grid: {
                    top: '25%',
                    right: "35%"
                },
                xAxis: [
                    {
                        type: 'category',
                        data: month,
                        axisPointer: {
                            type: 'shadow'
                        },
                        axisLabel: {
                            rotate: 50
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '人数',
                        min: 0,
                        max: maxPopulation,
                        interval: halve,
                        axisLabel: {
                            formatter: '{value} '
                        }
                    },
                ],
                series: [
                    {
                        name: '月数量（本年）',
                        type: 'bar',
                        data: yearCount
                    },
                    {
                        name: '月数量（上年）',
                        type: 'bar',
                        data: lastYearCount
                    },
                ]
            };
            div4.setOption(option4);
        }

        function chart_load5() {
            option5 = {
                title: {text: '已安置人次', left: '28%'},
                tooltip: {
                    trigger: 'axis'
                },
                color: ['#6BC9B6', '#5A88F6', '#ECA03B', '#7FC555'],
                toolbox: {},
                legend: {
                    data: ['月数量（本年）', '月数量（上年）', /*'同比比率', '环比比率'*/],
                    right: 0,
                    bottom: 50,
                    orient: 'vertical',
                    itemWidth: 18
                },
                grid: {
                    top: '25%',
                    right: "35%"
                },
                xAxis: [
                    {
                        type: 'category',
                        data: month,
                        axisPointer: {
                            type: 'shadow'
                        },
                        axisLabel: {
                            rotate: 50
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '人数',
                        min: 0,
                        max: maxPopulation,
                        interval: halve,
                        axisLabel: {
                            formatter: '{value} '
                        }
                    },
                ],
                series: [
                    {
                        name: '月数量（本年）',
                        type: 'bar',
                        data: yearCount
                    },
                    {
                        name: '月数量（上年）',
                        type: 'bar',
                        data: lastYearCount
                    },
                ]
            };
            div5.setOption(option5);
        }

        function chart_load6() {
            option6 = {
                title: {text: '已帮教人次', left: '30%'},
                tooltip: {
                    trigger: 'axis'
                },
                color: ['#6BC9B6', '#5A88F6', '#ECA03B', '#7FC555'],
                toolbox: {},
                legend: {
                    data: ['月数量（本年）', '月数量（上年）', /*'同比比率', '环比比率'*/],
                    right: 0,
                    bottom: 50,
                    orient: 'vertical',
                    itemWidth: 18
                },
                grid: {
                    top: '25%',
                    right: "35%"
                },
                xAxis: [
                    {
                        type: 'category',
                        data: month,
                        axisPointer: {
                            type: 'shadow'
                        },
                        axisLabel: {
                            rotate: 50
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '人数',
                        min: 0,
                        max: maxPopulation,
                        interval: halve,
                        axisLabel: {
                            formatter: '{value} '
                        }
                    },
                ],
                series: [
                    {
                        name: '月数量（本年）',
                        type: 'bar',
                        data: yearCount
                    },
                    {
                        name: '月数量（上年）',
                        type: 'bar',
                        data: lastYearCount
                    },
                ]
            };
            div6.setOption(option6);
        }
        if(!window.localStorage.getItem('storge')){
            mini.alert('缓存数据过多会造成系统异常，建议您及时清理浏览器缓存！');
            window.localStorage.setItem('storge','true')
        }
    });

    /**
     * 跳转对应页面
     * @param e e
     */
    function toPage(e) {
        if (e == '1') {
            childTheParent("iconfont icon-bangjiaogongzuoxinxiguanli","247110396346368","安帮工作信息管理","/basic/public-tab/view","70000");
        }else if (e == '2') {
            childTheParent("iconfont icon-bangjiaogongzuoxinxiguanli","247110396346368","安帮工作信息管理","/basic/public-tab/view","70000","zdbjdx");
        }else if (e == '3') {
            childTheParent("iconfont icon-huise","246736969695232","预释放人员衔接","/basic/public-tab/view","40000","sfs_wxjrs");
        }else if (e == '4') {
            if(${localCode}=='140000'){
                //山西个性
                childTheParent("iconfont icon-chaxunfangan","260324693196800","人户分离管理","/basic/public-tab/view","70000");
            }else {
                //正常
                $('.nav-parent-wrap li', window.parent.document).eq(3).trigger('click');
                $('.nav-child-wrap div ul li', window.parent.document).eq(21).trigger('click');
            }
        }else if (e == '5') {
            if(${localCode}=='140000'){
                //山西个性
                childTheParent("iconfont icon-anbangjidixinxiguanli","247162203947008","安帮基地信息管理","/basic/public-tab/view","60000");
            }else {
                //正常
                $('.nav-parent-wrap li', window.parent.document).eq(2).trigger('click');
                $('.nav-child-wrap div ul li', window.parent.document).eq(13).trigger('click');
            }
        }else if (e == '6') {
            if(${localCode}=='140000'){
                //山西个性
                childTheParent("iconfont icon-anbangshehuizuzhixinxiguanli","247123674447872","安帮社会组织信息管理","/basic/public-tab/view","60000");
            }else {
                //正常
                $('.nav-parent-wrap li', window.parent.document).eq(2).trigger('click');
                $('.nav-child-wrap div ul li', window.parent.document).eq(16).trigger('click');
            }
        }else if (e == '7') {
            if(${localCode}=='140000'){
                //山西个性
                childTheParent("iconfont icon-zhiyuanzhexinxiguanli","247149219315712","志愿者信息管理","/basic/public-tab/view","60000");
            }else {
                //正常
                $('.nav-parent-wrap li', window.parent.document).eq(2).trigger('click');
                $('.nav-child-wrap div ul li', window.parent.document).eq(12).trigger('click');
            }
        }
    }

    /**
     * 执行父页面方法
     * @param childICO 要跳转到的子图标
     * @param childId 要跳转到的子id，蓝色的table的id
     * @param childName 要跳转到的子名称
     * @param childUrl 要跳转到的子模板链接
     * @param topNav 上面的导航栏按钮id，一级菜单ID
     * @param different 返回不同，方便区分跳转页面
     */
    function childTheParent(childICO,childId,childName,childUrl,topNavId,different){
        parent.skipPublic(childICO,childId,childName,childUrl,topNavId,different);
    }



    function downloadFile() {
        var id = $("#id").val();
        var type = $("#type").val();
        if (1 == type) {
            //下载通知公告
            $.ajax({
                url: encodeURI("/azbj/tzgggl/noticeInfoManage/ifFileExist?id=" + id),
                cache: false,
                success: function (result) {
                    if (result.code == 1) {
                        top.location.href = encodeURI("/azbj/tzgggl/noticeInfoManage/downloadFilesZip/" + id);
                    } else {
                        mini.alert("没有可下载的文件");
                    }
                }
            });
        } else if (2 == type) {
            //下载政策文件
            $.ajax({
                url: encodeURI("/azbj/abzlxxgl/zcwjInfoManage/ifFileExist?id=" + id + "&taskId=" + 20),
                cache: false,
                success: function (result) {
                    if (result.code == 1) {
                        top.location.href = encodeURI("/azbj/abzlxxgl/zcwjInfoManage/downloadFilesZip?id=" + id + "&taskId=" + 20);
                    } else {
                        mini.alert("没有可下载的文件");
                    }
                }
            });
        } else if (3 == type) {
            //下载经验推介
            $.ajax({
                url: encodeURI("/azbj/abzlxxgl/zcwjInfoManage/ifFileExist?id=" + id + "&taskId=" + 22),
                cache: false,
                success: function (result) {
                    if (result.code == 1) {
                        top.location.href = encodeURI("/azbj/abzlxxgl/zcwjInfoManage/downloadFilesZip?id=" + id + "&taskId=" + 22);
                    } else {
                        mini.alert("没有可下载的文件");
                    }
                }
            });
        }
    }
</script>
</body>
</html>